<%-- 
    Document   : index
    Created on : Jun 15, 2011, 11:08:00 PM
    Author     : Admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="javax.naming.*" %>
<%@page import="bmp.entity.*" %>
<%@page import="bmp.object.*" %>
<%@page import="bmp.common.*" %>
<%@page import="bmp.client.common.*" %>
<%@page import="bmp.session.*" %>
<%@page import="bmp.client.exception.ConfigException" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
        <%
            try{
                Config.settingSystemPropertiesForSessionBean();
                Context ctx=new InitialContext();
                Object ref=ctx.lookup("QLSV");
                QLSVRemoteHome home=(QLSVRemoteHome)ref;
                       

                SinhVienOBJ sinhVien=new SinhVienOBJ();
                sinhVien.setAddress("000 Yes");
                sinhVien.setName("Tam Kute");
                sinhVien.setPhone("090000000");
                try{
                    QLSVRemote remote=home.create();
                    if(remote.insertSinhVien(sinhVien)){
                        out.print("User have created");
                    }
                }
                catch(Exception ex){
                    ex.printStackTrace();
                }
          }
          catch(ConfigException configException){
            configException.printStackTrace();
          }
        %>
    </body>
</html>
